package Message.Game
{
    import Framework.MQ.*;
    import Framework.Serialize.*;
    import Message.Public.*;

    public class SApplyMsg extends Object implements IMessageBase
    {
        public var fromPlayer:SPublicMiniPlayer;
        public var toPlayerName:String;
        public const _type:int = 12011;
        public static var _regist:SApplyMsg = new SApplyMsg(true);

        public function SApplyMsg(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            
        }

        public function getType() : int
        {
            return this._type;
        }

        public function clone() : IMessageBase
        {
            return new SApplyMsg();
        }

        public function __write(param1:SerializeStream) : void
        {
            this.fromPlayer.__write(param1);
            param1.writeString(this.toPlayerName);
            
        }

        public function __read(param1:SerializeStream) : void
        {
            this.fromPlayer = new SPublicMiniPlayer();
            this.fromPlayer.__read(param1);
            this.toPlayerName = param1.readString();
            
        }

    }
}
